package com.atguigu.lease;

import com.atguigu.lease.common.minio.MinioConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

/**
 * projectName: com.atguigu.lease
 *
 * @author: 赵伟风
 * description:
 * 解决: 我就导入了,但是我就不声明参数,我还不想报错!!
 *    1. 场景启动器,[[自动配置类]],不加载即可!! @SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
 *    2. 自定义的配置类进行排除 @ComponentScan
 *
 * springboot自动加载两类ioc组件
 *    1. 自动配置原理 @SpringBootApplication / @EnableAutoConfiguration / @Import(AutoConfigurationImportSelector.class)  142个自动配置类
 *    2. 自定义的组件类(@Controller...@Configuraion) @ComponentScan / 启动类所在的包 / 自己定义的配置类加入到ioc容器
 */
@SpringBootApplication
@ComponentScan(excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,classes = MinioConfiguration.class) )
public class AppWebApplication {

    public static void main(String[] args) {
        SpringApplication.run(AppWebApplication.class,args);
    }
}
